//
//  JKRLabel.m
//  ScrollViewDemo
//
//  Created by Lucky on 16/3/20.
//  Copyright © 2016年 Lucky. All rights reserved.
//

#import "JKRLabel.h"

@implementation JKRLabel

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        self.textAlignment = NSTextAlignmentCenter;
        self.userInteractionEnabled = YES;
        self.backgroundColor = [UIColor lightGrayColor];
        self.font = [UIFont systemFontOfSize:15];
        self.textColor = [UIColor blueColor];
    }
    return self;
}

- (void)setScale:(CGFloat)scale
{
    _scale = scale;
    
    self.textColor = [UIColor colorWithRed:scale green:scale blue:1 - scale alpha:1.0];
    
    CGFloat transformScale = 1 + scale * 0.3;
    
    self.transform = CGAffineTransformMakeScale(transformScale, transformScale);
}

@end
